import java.awt.*;
import javax.swing.*;
import java.awt.Dimension;

public class NotFound extends JFrame {
public NotFound(String name) {
	super(name);
	this.setSize(367,200);
	this.setResizable(false);
	centerWindow(this);
	this.setDefaultCloseOperation(EXIT_ON_CLOSE);
	JPanel nfPanel = new JPanel();
	this.add(nfPanel);
	nfPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
	JLabel label = new JLabel("String Not Found!", JLabel.CENTER);
	label.setPreferredSize(new Dimension(367, 200));
	this.getContentPane().add(label);
	this.pack();
	this.setVisible(true);
	}

private void centerWindow(Window w){
	Toolkit tk = Toolkit.getDefaultToolkit();
	Dimension d = tk.getScreenSize();
	setLocation ((d.width-w.getWidth())/2, (d.height-w.getHeight())/2);
}

	public static void main(String argv[]) {
		new NotFound("String Highlighter");
	}
}

